# -*- coding:utf8 -*-

from random import randint


class Individu:
    """Individu
    """
    # Attributes:
    __ADNString = None #String de l'ADN de l'individu
    __Score = None #Score de l'individu
    __Img = None #Adresse de l'image de l'individu
    __Id = None #Id de l'individu
    __Age = None
    
    # Operations
    def __init__(self, in_ADNString):
        """function Individu
        
        in_nom: ADN
        
        returns 
        """
        self.__ADNString = in_ADNString
        self.__Age = 0

    def setImage(self, in_addr_img):
        """function addImage

        in_addr_img : String

        returns
        """
        self.__Img = in_addr_img

    def getImage(self):
        return self.__Img

    def croiser(self, in_Pere, in_Mere):
        """function croiser

        in_Pere : Individu
        in_Mere : Individu

        returns Individu
        """
        ADNPere = in_Pere.getListeAlleles()
        ADNMere = in_Mere.getListeAlleles()
        GenesPere = ADNPere.getGenes()
        GenesMere = ADNmere.getGenes()
        out_Fils = Main()
        #mariage des alleles pere et mere
        for k in range(len(ADNPere)):
            if randint(0, 1) == 0:
                GenesFils[k] = GenesPere[k]
            else:
                GenesFils[k] = GenesPere[k]

    def setId(self, in_id):
        self.__Id == in_id

    def getId(self):
        return self.__Id
